<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>超市收银系统</title>
    <link type="text/css" rel="stylesheet" href="fontsawesome/css/font-awesome.css"/>
    <link type="text/css" rel="stylesheet" href="css/style.css"/>
</head>
    <style type="text/css">
        .providerAdd{
            line-height: 50px;
            width: 99%;
            height: 97%;
            border: 1px solid #e0f0fd;
            margin: 0 5px;
            background-color: rgba(32, 163, 255, 0.18);
                          }
    #balForm {
        line-height: 50px;
        width: 50%;
        height: 70%;

        margin:150px auto;

    }
    .add {
        width: 80%;
        line-height: 45px;
        margin: 20px 32%;
        font-size: 22px;
        font-weight: bold;
    }

    .add input {
        display: inline;
    }
    .add select {
        display: inline;
    }
    .providerAddBtn {
        margin-top: 40px;

    }
    .providerAdd input[type="button"]{
        width: 8%;

        font-size: 25px;
        background-color: rgba(10, 94, 182, 0.42);
    }
    .providerAdd input[value="确认充值"]{
        position:absolute;
        margin: 0;
        right:51%;
    }
    .providerAdd input[value="返回"]{
        position:absolute;
        margin: 0;
        right:41%;
    }
</style>
<body>
<!--用户-->
<div class="providerAdd">
    <form id="balForm">
        <!--div的class 为error是验证错误，ok是验证成功-->
        <div class="add">
            <span for="balance">添加余额：</span>
            <input type="text" name="money" id="balance" value="">
        </div>
        <div class="providerAddBtn">
            <input type="button"  id="add" value="确认充值" >

            <input type="button" id="back"  value="返回" >
        </div>
    </form>
</div>

</body>
<script src="/js/jquery-2.2.1.min.js"></script>
<script src="/js/jump.js"></script>
<script type="text/javascript">
    $(".providerAddBtn :button[value='确认充值']").bind("click", function() {
        /* 表单验证 */
        /* 确认提示 */
        if(!confirm("确定充值吗?")) return;
        // location = "/pay?"+$("#balForm").serialize();
        location=window.open("/pay?"+$("#balForm").serialize(),"_blank");
    });
    $(".providerAddBtn :button[value='返回']").bind("click", function() {
        location = "/bal/query"
    });
</script>

</html>